// eslint.config.mjs
import antfu from '@antfu/eslint-config'
import { FlatCompat } from '@eslint/eslintrc'

const compat = new FlatCompat()
// import autoImport from '@/types/.eslintrc-auto-import.json'

export default antfu(
  // {
  //   languageOptions: {
  //     globals: autoImport?.globals,
  //   },
  // },
  {
    stylistic: {
      overrides: {
        'antfu/top-level-function': 'off',
      },
    },
    vue: true,
  },
  ...compat.config({
    extends: [
      './src/types/.eslintrc-auto-import.json',
    ],
  }),
  {
    rules: {
      'no-console': ['error', { allow: ['warn', 'error', 'log'] }],
    },
  },
)
